<template>
	<view class="box">
		<view class="header">
			<text>我的消息</text>
		</view>
		
		<view class="item-list">
			<view class="item" @click="toDetail">
				<view class="portrait">
					<image src="../../static/logo.png" mode=""></image>
				</view>
				
				<view class="content">
					<view class="top">
						<text class="name">莫小子</text>
						<text class="time">12:38</text>
					</view>
					
					<view class="bottom">
						<text>咱俩是一个社团的，以后可以一块去活动吗</text>
					</view>
				</view>
			</view>
			
			<view class="item">
				<view class="portrait">
					<image src="../../static/logo.png" mode=""></image>
				</view>
				
				<view class="content">
					<view class="top">
						<text class="name">莫小子</text>
						<text class="time">12:38</text>
					</view>
					
					<view class="bottom">
						<text>咱俩是一个社团的，以后可以一块去活动吗</text>
					</view>
				</view>
			</view>
			
			<view class="item">
				<view class="portrait">
					<image src="../../static/logo.png" mode=""></image>
				</view>
				
				<view class="content">
					<view class="top">
						<text class="name">莫小子</text>
						<text class="time">12:38</text>
					</view>
					
					<view class="bottom">
						<text>咱俩是一个社团的，以后可以一块去活动吗</text>
					</view>
				</view>
			</view>
		</view>
		<Launch></Launch>
	</view>
</template>

<script scoped>
	import Launch from "../launch/launch.vue"
	export default {
		components: {
			Launch
		},
		data () {
			return {}
		},
		methods: {
			toDetail () {
				console.log("??")
				uni.navigateTo({
					url: "./talk"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		.header {
			height: 97rpx;
			background: #fff;
			text-align: center;
			line-height: 97rpx;
			font-size: $middleFont;
			font-weight: bold;
			box-shadow: $viewShadow;
			padding-top: 40rpx;
		}
		
		.item-list {
			padding: 0 54rpx;
			margin-top: $middleMargin;
			
			.item {
				margin-top: $smallMargin;
				display: flex;
				
				.portrait {
					width: 90rpx;
					height: 90rpx;
					& > image {
						width: 100%;
						height: 100%;
						border-radius: 50%;
					}
				}
				
				.content {
					flex: 1;
					
					.top {
						margin-top: $smallMargin;
						padding-left: 27rpx;
						display: flex;
						justify-content: space-between;
					
						.name {
							font-size: $smallFont;
							font-weight: bold;
						}
						
						.time {
							font-size: 21rpx;
							color: $subColor;
						}
					}
					
					.bottom {
						margin-top: $smallMargin;
						padding-left: 27rpx;
						font-size: $smallFont;
						color: $subColor;
					}
				}
			}
		}
	}
</style>
